package com.fruitsales.perm.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.fruitsales.perm.dao.PermissionMapper;
import com.fruitsales.perm.dao.RoleMapper;

/**

 * @author Administrator
 *
 */
@Service
@Transactional(rollbackFor=Exception.class)
public class PermService {
	@Autowired
	private RoleMapper roleMapper;
	
	@Autowired
	private PermissionMapper permMapper;
	
	@Transactional(readOnly=true)
	public List<Map<String, Object>> queryRole(String LoginName){
		
		return roleMapper.queryRole(LoginName);
		
	}
	
	@Transactional(readOnly=true)
	public List<Map<String, Object>> queryPerm(String LoginName){
		
		return permMapper.queryPerm(LoginName);
		
	}
	
	
	
}
